package net.ib.mtalk.global;

import android.content.Context;
import android.telephony.TelephonyManager;
import android.util.Log;

public class PhoneUtils 
{
	public static boolean compareUsimNumber(Context context, String number, String countryNumber)
	{
		TelephonyManager mTelephonyMgr = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
		if(mTelephonyMgr == null)
			return false;
		
		String myNumber = mTelephonyMgr.getLine1Number();
		if(myNumber == null)
			return false;
		
		String inputNumber = number;
		if(myNumber.contains("+"))
			inputNumber = countryNumber + Integer.parseInt(number);
		
		return inputNumber.equals(myNumber);
	}
}
